package com.link.base.base.mpconfig.service;

import com.link.base.base.mpconfig.model.MpMenu;
import com.link.core.basic.service.BasicService;
import com.link.core.basic.service.BasicServiceException;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * 小程序菜单基础数据维护
 *
 * @author: 闫有霞
 * @date: 2019/12/19
 */
public interface MpMenuService extends BasicService<MpMenu> {
    /**
     * @createdBy 闫有霞
     * @date 2018/12/7
     * @methods: updateValidFlag
     * @param:  MpMenu entity
     * @return:  void
     * @description: 更新是否有效
     **/
    public void updateValidFlag(MpMenu entity) throws Exception;


    /**
     *@createdBy 闫有霞
     *@date 2018/12/7
     *@methods: deleteAll
     *@param: MpMenu entity
     *@return: void
     *@description: 级联的删除  即删除一级菜单时删除其子菜单
     **/
    @Transactional(rollbackFor = BasicServiceException.class)
    public void deleteAll(MpMenu entity) throws Exception;

    /**
     *@createdBy 闫有霞
     *@date 2018/12/10
     *@methods: queryMenu
     *@param: MpMenu entity
     *@return: List
     *@description: 查询一级菜单及其对应的二级菜单
     **/
    public List<MpMenu> queryMenu(MpMenu entity) throws Exception;
}
